package com.lds.config.center.common.model.cluster.request;

import com.lds.management.center.common.model.db.request.BaseUpdateRequest;
import lombok.*;
import org.apache.commons.lang3.StringUtils;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 更新 - 请求
 *
 * @author lidongsheng
 * @since 2025-06-26
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ClusterBaseUpdateRequest extends BaseUpdateRequest implements Serializable {
    /**
     * 集群ID
     */
    @NotNull(message = "id不能为空")
    private Long id;


    /**
     * 集群名称
     */
    private String name;
    /**
     * 环境ID
     */
    private Long envId;
    /**
     * 描述
     */
    private String desc;

    public void setName(String name) {
        this.name = StringUtils.trimToNull(name);
    }

    public void setDesc(String desc) {
        this.desc = StringUtils.trimToNull(desc);
    }
}
